import { RouterProvider } from 'react-router-dom';
import router from './routes';
import { ConfigProvider } from 'react-vant';
import { Provider } from 'react-redux';
import store from './utils/redux/store';

const App: React.FC = () => {
  return (
    <>
      <ConfigProvider
        themeVars={{
          primaryColor: '#7232dd',
          successColor: '#00b578',
          warningColor: '#ff8f1f',
          dangerColor: '#ff4d4f',
          gray1: '#f7f8fa',
          gray2: '#f2f3f5',
          gray3: '#ebedf0',
          gray4: '#dcdee0',
          gray5: '#c8c9cc',
          gray6: '#969799',
          gray7: '#646566',
          gray8: '#323233',
        }}
      >
        <Provider store={store}>
          <RouterProvider router={router} />
        </Provider>
      </ConfigProvider>
    </>
  );
};

export default App;
